package cn.qyd.kaoshi;

import java.util.*;

/**
 * @author 邱运铎
 * @date 2024-03-19 16:14
 */
public class StringLittleDemo {
    public static void main(String[] args) {
        boolean flag = true;
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext() && flag) {
            String str = scanner.nextLine();
            char[] chars = str.toCharArray();
            HashMap<Character,Integer> map = new HashMap<>();
            for (int i = 0; i < chars.length; i++) {
               map.put(chars[i],map.getOrDefault(chars[i],0) + 1);
            }

            Integer min = Collections.min(map.values());

            for (Map.Entry entry : map.entrySet()) {
                if(min == entry.getValue()) {
                    str = str.replaceAll(String.valueOf(entry.getKey()),"");
                }
            }
            System.out.println(map);

            if ("no".equals(str))
                break;
            System.out.println(str);
        }
        System.out.println();
    }
}
